package com.huluobo.a2107jetpackkotlindemo.databinding

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide

/**
 *  Created by LC on 2023/11/23.
 */
class ItemBind {
    companion object {
        @BindingAdapter(value = ["android:imageUrl"])
        @JvmStatic
        fun setImage(view: ImageView, url: String?) {
            if (url != null) {
                Glide.with(view.context).load(url).into(view)
            }
        }
    }
}